package practice_04;

import java.util.ArrayList;

public class ArrayList_01 {

    public static void arrayList_01() {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        System.out.print("[");
        for (int i = 0; i < list.size(); i++) {
            if (i == list.size() - 1) {
                System.out.println(list.get(i) + "]");
            } else {
                System.out.print(list.get(i) + ", ");
            }
        }
        System.out.println(list);
    }
}
